package com.huakang.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * record
 * @author 
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Record implements Serializable {
    private Integer reid;
    @JsonFormat(pattern="yyyy-MM-dd")
    private Date redata;

    private Integer rdnum;

    private Integer medid;

    private Integer inpid;

    private static final long serialVersionUID = 1L;

    public Integer getReid() {
        return reid;
    }

    public void setReid(Integer reid) {
        this.reid = reid;
    }

    public Date getRedata() {
        return redata;
    }

    public void setRedata(Date redata) {
        this.redata = redata;
    }

    public Integer getRdnum() {
        return rdnum;
    }

    public void setRdnum(Integer rdnum) {
        this.rdnum = rdnum;
    }

    public Integer getMedid() {
        return medid;
    }

    public void setMedid(Integer medid) {
        this.medid = medid;
    }

    public Integer getInpid() {
        return inpid;
    }

    public void setInpid(Integer inpid) {
        this.inpid = inpid;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Record other = (Record) that;
        return (this.getReid() == null ? other.getReid() == null : this.getReid().equals(other.getReid()))
            && (this.getRedata() == null ? other.getRedata() == null : this.getRedata().equals(other.getRedata()))
            && (this.getRdnum() == null ? other.getRdnum() == null : this.getRdnum().equals(other.getRdnum()))
            && (this.getMedid() == null ? other.getMedid() == null : this.getMedid().equals(other.getMedid()))
            && (this.getInpid() == null ? other.getInpid() == null : this.getInpid().equals(other.getInpid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getReid() == null) ? 0 : getReid().hashCode());
        result = prime * result + ((getRedata() == null) ? 0 : getRedata().hashCode());
        result = prime * result + ((getRdnum() == null) ? 0 : getRdnum().hashCode());
        result = prime * result + ((getMedid() == null) ? 0 : getMedid().hashCode());
        result = prime * result + ((getInpid() == null) ? 0 : getInpid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", reid=").append(reid);
        sb.append(", redata=").append(redata);
        sb.append(", rdnum=").append(rdnum);
        sb.append(", medid=").append(medid);
        sb.append(", inpid=").append(inpid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}